package com.haois.mp.database.module.offaccounts.service;

import com.haois.mp.database.module.common.daomain.InviteRecord;
import com.haois.mp.database.module.common.daomain.ShareRecord;
import com.haois.mp.database.module.offaccounts.dao.MpRecordMapper;
import com.haois.mp.database.util.jx.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by RuiHaoZ on 2018/3/14 20:18
 */
@Service
public class RecordService {

    @Autowired
    private MpRecordMapper mpRecordMapper;

    public void addShare(ShareRecord shareRecord) {
        shareRecord.setCount(0);
        shareRecord.setCreateTime(DateUtil.getYMdHms());
        mpRecordMapper.addShare(shareRecord);
    }
    public void addInvite(InviteRecord inviteRecord) {
        inviteRecord.setCreateTime(DateUtil.getYMdHms());
        mpRecordMapper.addInvite(inviteRecord);
    }
}
